# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: George Hilliard <gh403@msstate.edu>

pkgname=ptunnel
pkgver=0.72
pkgrel=6
pkgdesc="A tool for reliably tunneling TCP connections over ICMP echo request and reply packets"
arch=('loong64' 'x86_64')
url="https://www.cs.uit.no/~daniels/PingTunnel"
license=('BSD')
depends=('libpcap')
source=("https://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-$pkgver.tar.gz"
        "ptunnel.service")
sha512sums=('943fc571ca95bb6af59f2a74458470865a89a502145bb1e5cf9b86159d61d897418d10d100691337f299892af7aba65964624462068a77ef1645890a4abf5d17'
            'fcb49a4fab083c126bf8355bd6df86ab92abc77b792747e217c445591917851f8993b20fbd69292f74b5f5bdab4f36909ec3aa739ce350809220a5ebd1b243dd')

build() {
  cd "$srcdir/PingTunnel"
  make
}

package() {
  install -Dm755 PingTunnel/ptunnel "$pkgdir/usr/bin/ptunnel"
  install -Dm644 ptunnel.service "$pkgdir/usr/lib/systemd/system/ptunnel.service"
  install -Dm644 PingTunnel/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et:
